Thumb

HTML Lists (OL,UL) Tag

1/29/2020 6:46:17 AM

Html list are two type one is order list and another is unorder list. When we write one, two serials then we use order list and when we use just show list then we use unorder list. This type list tag is most important for show the listed item. Now given bellow the list example code and explain the code:

<!DOCTYPE html>
<html>
      <head>
      	<title>This is HTML</title>
      </head>
      <body>
<h2>Order list</h2>
<ol>
  <li>Item1</li>
  <li>Item1</li>
  <li>Item1</li>
  <li>Item1</li>
</ol>
<h2>Unorder list</h2>
<ul>
  <li>Item1</li>
  <li>Item1</li>
  <li>Item1</li>
  <li>Item1</li>
</ul>
      </body>
</html>

Now we can see ‘ol’ is order list and ‘ul’ is unorder list. This tag are most important and most useful tags when we show the list of items or another list.